cmake_minimum_required(VERSION 2.8)

project (serial_lib)

include_directories(inc)
set (SRC_SERIAL src/serial_drive.cpp)
set (SRC_PPS src/ppstest.c)
set (SRC_SYSTIME src/CSystemTime.cpp)
set (SRC_LOG src/mlog.cpp)
set (SRC_YEARNEC src/TwoYearNec.c)
set (SRC_TX2TEM src/diagnose.cpp)


add_library (serial_lib_static STATIC ${SRC_SERIAL})
add_library (pps_lib_static STATIC ${SRC_PPS})
add_library (systime_lib_static STATIC ${SRC_SYSTIME})
add_library (mlog_lib_static STATIC ${SRC_LOG})
add_library (Tyear_lib_static STATIC ${SRC_YEARNEC})
add_library (TX2TEM_lib_static STATIC ${SRC_TX2TEM})

set_target_properties (serial_lib_static PROPERTIES OUTPUT_NAME "serial_drive")
set_target_properties (pps_lib_static PROPERTIES OUTPUT_NAME "pps_lib")
set_target_properties (systime_lib_static PROPERTIES OUTPUT_NAME "sys_time")
set_target_properties (mlog_lib_static PROPERTIES OUTPUT_NAME "mlog_lib")
set_target_properties (Tyear_lib_static PROPERTIES OUTPUT_NAME "Tyear_lib")
set_target_properties (TX2TEM_lib_static PROPERTIES OUTPUT_NAME "Tx2Tem_lib")
set (LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
